<?php

namespace app\common\model;


class ShopFlashsaleModel extends BaseModel
{
    protected $name = 'shop_flashsale'; //定义用户表
    //开启自动写入时间戳
    protected $autoWriteTimestamp = false;
    // 定义自动完成的属性
    protected $auto = []; //新增修改
    protected $insert = []; //插入
    protected $update = []; //修改

    protected function getStatusTextAttr($value, $data)
    {
        $status = [0=>'取消',1=>'正常',2=>'结束'];
        return $status[$data['status']];
    }

}